package com.yupi.yuoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.yuoj.model.dto.contentrecommendation.ContentRecommendationQueryRequest;
import com.yupi.yuoj.model.entity.ContentRecommendation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yuoj.model.vo.ContentRecommendationVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author admin
* @description 针对表【content_recommendation(内容推荐关联表)】的数据库操作Service
* @createDate 2025-11-01 21:28:47
*/
public interface ContentRecommendationService extends IService<ContentRecommendation> {

    /**
     * 校验数据
     *
     * @param contentRecommendation
     * @param add 对创建的数据进行校验
     */
    void validContentRecommendation(ContentRecommendation contentRecommendation, boolean add);

    /**
     * 获取查询条件
     *
     * @param contentRecommendationQueryRequest
     * @return
     */
    QueryWrapper<ContentRecommendation> getQueryWrapper(ContentRecommendationQueryRequest contentRecommendationQueryRequest);
    
    /**
     * 获取内容推荐封装
     *
     * @param contentRecommendation
     * @param request
     * @return
     */
    ContentRecommendationVO getContentRecommendationVO(ContentRecommendation contentRecommendation, HttpServletRequest request);

    /**
     * 分页获取内容推荐封装
     *
     * @param contentRecommendationPage
     * @param request
     * @return
     */
    Page<ContentRecommendationVO> getContentRecommendationVOPage(Page<ContentRecommendation> contentRecommendationPage, HttpServletRequest request);

}
